#include "stm32f10x.h"                  // Device header
#include "Delay.h"
#include "OLED.h"
#include "MPU6050.h"
#include "MPU6050_Reg.h"

uint8_t ID;
int16_t AX,AY,AZ,GX,GY,GZ;
int main(void)
{
	OLED_Init();
    MPU6050_Init();
    ID = GETMPU6050_ID();
    OLED_ShowString(1,1,"ID:");
    OLED_ShowHexNum(1,4,ID,2);
    
	while (1)
	{
        MPU6050_GetData(&AX, &AY, &AZ, &GX, &GY, &GZ);
        OLED_ShowNum(2,1,AX,5);
        OLED_ShowNum(3,1,AY,5);
        OLED_ShowNum(4,1,AZ,5);
                            
        OLED_ShowNum(2,8,GX,5);
        OLED_ShowNum(3,8,GY,5);
        OLED_ShowNum(4,8,GZ,5);
        
	}
}
